package com.yazi.mxz.person.data.form.shop;

import javax.validation.constraints.NotNull;

import com.yazi.mxz.common.entity.beans.Category;
import com.yazi.mxz.common.entity.beans.StoreGoods;
import com.yazi.mxz.person.data.form.Form;

/**
 * 表单对象－店铺商品
 *
 * @author mo_yq5
 * @since 2016年6月1日
 */
public class StoreGoodsForm extends Form<StoreGoods> {

	/**
	 * 表单类型－店铺商品－编辑
	 */
	public static interface Edit {
	}
	
	public StoreGoodsForm() {
		super(new StoreGoods());
	}

	@NotNull(groups={Edit.class, SpecTypeForm.Add.class})
	public Long getStoreGoodsId() {
		return get().getStoreGoodsId();
	}

	public void setStoreGoodsId(Long storeGoodsId) {
		get().setStoreGoodsId(storeGoodsId);
	}

	@NotNull(groups={Edit.class}, message="请指定系统类目")
	public Category getCategory() {
		return get().getCategory();
	}

	public void setCategory(CategoryForm category) {
		get().setCategory(category.get());
	}

	@NotNull(groups={Edit.class}, message="标题不能为空")
	public String getTitle() {
		return get().getTitle();
	}

	public void setTitle(String title) {
		get().setTitle(title);
	}

	@NotNull(groups={Edit.class}, message="关键词不能为空")
	public String getKeywords() {
		return get().getKeywords();
	}

	public void setKeywords(String keywords) {
		get().setKeywords(keywords);
	}

	@NotNull(groups={Edit.class}, message="默认价格不能为空")
	public Float getPrice() {
		return get().getPrice();
	}

	public void setPrice(Float price) {
		get().setPrice(price);
	}

	@NotNull(groups={Edit.class}, message="底存不能为空")
	public Integer getStockEnd() {
		return get().getStockEnd();
	}

	public void setStockEnd(Integer stockEnd) {
		get().setStockEnd(stockEnd);
	}

	@NotNull(groups={Edit.class}, message="默认出售量不能为空")
	public Float getSellDef() {
		return get().getSellDef();
	}

	public void setSellDef(Float sellDef) {
		get().setSellDef(sellDef);
	}

	@NotNull(groups={Edit.class}, message="最小购买量不能为空")
	public Float getSellMin() {
		return get().getSellMin();
	}

	public void setSellMin(Float sellMin) {
		get().setSellMin(sellMin);
	}

	@NotNull(groups={Edit.class}, message="购买量增幅不能为空")
	public Float getSellExt() {
		return get().getSellExt();
	}

	public void setSellExt(Float sellExt) {
		get().setSellExt(sellExt);
	}

	//@NotNull(groups={Edit.class}, message="单位转换率不能为空")
	public Float getUnitConvert() {
		return get().getUnitConvert();
	}

	public void setUnitConvert(Float unitConvert) {
		get().setUnitConvert(unitConvert);
	}

	@NotNull(groups={Edit.class}, message="商品默认图片不能为空")
	public String getPic() {
		return get().getPic();
	}

	public void setPic(String pic) {
		get().setPic(pic);
	}

	public String getDispatch() {
		return get().getDispatch();
	}

	public void setDispatch(String dispatch) {
		get().setDispatch(dispatch);
	}

	public Long getSort() {
		return get().getSort();
	}

	public void setSort(Long sort) {
		get().setSort(sort);
	}

	@NotNull(groups={Edit.class}, message="商品描述不能为空")
	public String getDescription() {
		return get().getDescription();
	}

	public void setDescription(String description) {
		get().setDescription(description);
	}

	public String getSubTitle() {
		return get().getSubTitle();
	}

	public void setSubTitle(String subTitle) {
		get().setSubTitle(subTitle);
	}

	@NotNull(groups={Edit.class}, message="商品上架状态不能为空")
	public Integer getStatus() {
		return get().getStatus();
	}

	public void setStatus(Integer status) {
		get().setStatus(status);
	}
	
}
